package com.mililoan.model.system;

import java.util.ArrayList;
import java.util.Arrays;

public class Actor {
	private Integer id;					//角色序号	ACTOR_ID	NUMBER(3)	TRUE	FALSE	TRUE
	private String actorName;			//角色名	ACTOR_NAME	VARCHAR(20)	FALSE	FALSE	FALSE
	private String isvalid;				//0 无效 1有效
    private Integer depCode;			//部门编号	DEPAREMENT_CODE	NUMBER(6)	FALSE	TRUE	FALSE
	private String summary;
	
	private String depName;
	private ArrayList<Function> funcs;		//功能列表
	private ArrayList<Integer> funCodes;	//功能code列表
	private String funCodeArrStr;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getDepName() {
		return depName;
	}
	public void setDepName(String depName) {
		this.depName = depName;
	}
	public ArrayList<Function> getFuncs() {
		return funcs;
	}
	public void setFuncs(ArrayList<Function> funcs) {
		if(funcs!=null){
			funCodes = new ArrayList<Integer>();
			for(int i=0;i<funcs.size();i++){
				funCodes.add(funcs.get(i).getCode());
			}
			this.funcs = funcs;
		}
	}
	public ArrayList<Integer> getFunCodes() {
		return funCodes;
	}
	public void setFunCodes(ArrayList<Integer> funCodes) {
		this.funCodes = funCodes;
	}
	
	/**角色名字符串**/
	public String getStringFunCodes() {
		String str = "";
		if(null!=funCodes){
			str = Arrays.toString(funCodes.toArray()).replace("[", "").replace("]", "").replace(" ", "");
		}
		return str;
	}

	public String getFunCodeArrStr() {
		return funCodeArrStr;
	}
	public void setFunCodeArrStr(String funCodeArrStr) {
		this.funCodeArrStr = funCodeArrStr;
	}
	public String getisvalid() {
		return isvalid;
	}
	public void setisvalid(String isvalid) {
		this.isvalid = isvalid;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getActorName() {
		return actorName;
	}
	public void setActorName(String actorName) {
		this.actorName = actorName;
	}
	public String getIsvalid() {
		return isvalid;
	}
	public void setIsvalid(String isvalid) {
		this.isvalid = isvalid;
	}
	public Integer getDepCode() {
		return depCode;
	}
	public void setDepCode(Integer depCode) {
		this.depCode = depCode;
	}
}
